Method for obtaining dns and tunnel gateway device

ABSTRACT

The present invention provides a tunnel gateway device used for: receiving a domain name system (DNS) server address for an inner layer or outer layer service of a tunnel configured by an automatic control server according to a management protocol; and taking its own address as the DNS server&#39;s address and sending the address to a client, or sending the configured DNS server address to the client. The present invention also provides a method for obtaining the DNS, and the present invention implements the DNS server distribution and obtaining of the DNS without depending on the address protocol.

TECHNICAL FIELD

The present invention relates to the data communication technology, andin particular, to a method for obtaining a domain name system (DNS) in atunnel situation and a tunnel gateway device.

BACKGROUND OF THE RELATED ART

With the flourishing development of the Internet, in the near futurethat can be estimated, the IPv4 global unicast address used by theglobal Internet user at present will be exhausted progressively; andwith the growing up of the concept of the Ubiquitous Network and theconstruction demand of the Internet of Things in the global range, theIPv6, as the major network layer technology of the Next-GenerationInternet (abbreviated as NGI), is gradually getting into the role.

In order to deploy rapidly in the evolution process to the IPv6, theIETF has provided the slight-technology-level dual stack-lite (DS-LITE)based on the tunnel and the IPv6 rapid deployment (6rd), and both kindsof technologies use the tunnel technology.

The DS-LITE provides the method for bearing the IPv4 data service byusing the IPv6 tunnel; one end of the DS-LITE can be in the homegateway, and the other end locates at the boundary of the IPv4/IPv6. TheDS-LITE is not limited to the connection way of the IPv6, and can accessthrough the ways, such as, the Point to Point protocol over Ethernet(PPPoE) or the IP over Ethernet (IPoE), etc., while for the IPv4 clientwithin the tunnel, it has no regulation on how to obtain the DNS yet. Asto the 6rd, the tunnel of the IPv4 is used to bear the IPv6 dataservice, one end of the 6rd can be in the home gateway, and the otherend locates in the boundary of the IPv4/IPv6; as to the IPv6 clientwithin the tunnel, there is a scheme supporting the DNS Server carryingthe IPv6 by expanding the DHCPv4 protocol now, thus configuring the DNSserver of the 6rd corresponding to the IPv6.

To obtain the DNS server by using the Dynamic Host ConfigurationProtocol (DHCP), it must support the DHCP protocol; if in the situationthat it does not support the DHCP protocol, the home gateway based onthe tunnel way is unable to obtain the DNS server.

CONTENT OF THE INVENTION

The present invention provides a method for obtaining a DNS and a tunnelgateway device, to implement the distribution of the DNS in the tunnelway.

In order to solve the above-mentioned problem, the present inventionprovides a tunnel gateway device, configured to:

receive a domain name system (DNS) server address for an inner layer orouter layer service network of a tunnel configured by an automaticcontrol server according to a management protocol; and

take the tunnel gateway device's address as the DNS server's address andsend the address to a client, or send the DNS server's address to theclient.

Alternatively, the above device may have the following features: thetunnel gateway device is further configured to: receive a DNS requestfrom the client, or obtain IP address information corresponding to theDNS request from the local or the DNS server, and return thecorresponding IP address information to the client.

Alternatively, the above device may have the following features: thetunnel gateway device is configured to obtain IP address informationcorresponding to the DNS request from the local or the DNS serveraccording to the following way:

after receiving the DNS request, searching DNS items stored locally,when there is a matched DNS item in local, obtaining the IP addressinformation corresponding to the DNS request according to the matchedDNS item; when there is no matched DNS item in local, obtaining thematched DNS item from the configured DNS server, and obtaining the IPaddress information corresponding to the DNS request according to thematched DNS item; or,

after receiving the DNS request, obtaining the matched DNS item from theconfigured DNS server, and obtaining the IP address informationcorresponding to the DNS request according to the matched DNS item.

Alternatively, the above device may have the following features: thetunnel gateway device is further configured to: store the DNS itemobtained from the DNS server, and when storing the DNS item, if localDNS item record is already full, then delete the local DNS itemaccording to storage time and/or use frequency of the DNS item.

Alternatively, the above device may have the following features: thetunnel gateway device is further configured to: receive the DNS requestof the client, transparently forward the DNS request to the DNS server,and transparently forward the IP address information returned by the DNSserver back to the client.

Alternatively, the above device may have the following features: thetunnel gateway device supports a slight-level dual stack-lite (DS-LITE)and/or an IPv6 rapid deployment (6rd) technology.

Alternatively, the above device may have the following features: themanagement protocol is a TR069 protocol or other terminal controlprotocol.

The present invention also provides a method for obtaining a domain namesystem (DNS), comprising:

an automatic control server configuring a domain name system (DNS)server address for an inner layer or outer layer service network of atunnel on a tunnel gateway device according to a management protocol;and

the tunnel gateway device taking an address thereof as the DNS server'saddress and sending the address to a client, or the tunnel gatewaydevice sending the DNS server's address to the client.

Alternatively, the above device may have the following features: whenthe tunnel gateway device takes an address thereof as the DNS server'saddress and sending the address to the client, further comprising:

the client sending a DNS request to the tunnel gateway device; and

the tunnel gateway device obtaining IP address information correspondingto the DNS request from the local or the DNS server, and returning theIP address information corresponding to the DNS request to the client.

Alternatively, the above device may have the following features: thestep of the tunnel gateway device obtaining IP address informationcorresponding to the DNS request comprises:

the tunnel gateway device, after receiving the DNS request, searchingDNS items stored locally, when there is a matched DNS item in local,obtaining the IP address information corresponding to the DNS requestaccording to the matched DNS item; when there is no matched DNS item inlocal, obtaining the matched DNS item from the configured DNS server forthe inner layer or outer layer service network of the tunnel, andobtaining the IP address information corresponding to the DNS requestaccording to the matched DNS item; or,

the tunnel gateway device, after receiving the DNS request, obtainingthe matched DNS item from the configured DNS server, and obtaining theIP address information corresponding to the DNS request according to thematched DNS item.

Alternatively, the above device may have the following features: thetunnel gateway device storing the DNS item obtained from the DNS server,and when storing the DNS item, if local DNS item record is already full,then deleting the local DNS item according to storage time and/or usefrequency of the DNS item.

Alternatively, the above device may have the following features: whenthe tunnel gateway device sends the DNS server's address to the client,further comprising: the tunnel gateway device receiving the DNS requestof the client, transparently forwarding the DNS request to the DNSserver, and transparently forwarding the IP address information returnedby the DNS server back to the client.

Alternatively, the above device may have the following feature: thetunnel gateway device supports a slight-level dual stack-lite (DS-LITE)and/or an IPv6 rapid deployment (6rd) technology.

Alternatively, the above device may have the following feature: themanagement protocol is a TR069 protocol or other terminal controlprotocol.

The embodiment of the present invention provides a method fordistributing the DNS server without depending on the address protocoland method for the client obtaining the DNS. In the embodiment of thepresent invention, the configuration way can be unified by configuringthe address of the DNS Server through the management protocol. Thegateway buffers the corresponding DNS item and responds to the DNSrequest sent by the client, which reduces the request quantity sent tothe remote DNS server by the client.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a basic network diagram of restraining an IPv6 evolution in atunnel way according to an embodiment of the present invention;

FIG. 2 is a flow of configuring a gateway device DNS server andobtaining a client DNS according to an embodiment of the presentinvention;

FIG. 3 is a flow of configuring 6RD tunnel gateway device DNS server andobtaining a client DNS according to an embodiment of the presentinvention;

FIG. 4 is a flow of configuring DS-LITE tunnel gateway device DNS serverand obtaining a client DNS according to an embodiment of the presentinvention.

PREFERRED EMBODIMENTS OF THE PRESENT INVENTION

There are two methods for obtaining the DNS provided by the embodimentof the present invention:

in the first method:

an automatic control server configures a domain name system (DNS) serveraddress for an inner layer of a tunnel on a tunnel gateway devicethrough a management protocol; and

the tunnel gateway device sends the configured DNS server address to theclient.

Alternatively, the client sends the DNS request to the DNS server, theDNS server responds to the DNS request and returns the corresponding IPaddress information to the client, wherein, the information interactedbetween the client and the DNS server is transparently forwarded by thetunnel gateway device.

Wherein, the management protocol is a TR069 protocol or other terminalcontrol protocol.

Wherein, the tunnel gateway device supports a slight-level dualstack-lite (DS-LITE) and/or IPv6 rapid deployment (6rd) technology.

Wherein, the tunnel gateway device sends the DNS server address to theclient when distributing the IP address for the client.

In the second method:

an automatic control server configures a domain name system (DNS) serveraddress of an inner layer or outer layer service network of a tunnel ona tunnel gateway device through a management protocol; and

the tunnel gateway device regards an own address as the DNS serveraddress and sends the address to the client.

Further, the tunnel gateway device receives the DNS request of theclient, responds to the DNS request, obtains the corresponding IPaddress information from the local or the DNS server, and returns thecorresponding IP address information to the client.

Wherein, the tunnel gateway device obtains the corresponding IP addressinformation from the local or the DNS server according to the followingway:

after receiving the DNS request, searching DNS items stored locally,when there is a matched DNS item in local, obtaining the correspondingIP address information according to the matched DNS item; when there isno matched DNS item in local, obtaining the matched DNS item from theconfigured DNS server of the inner layer or outer layer service networkof the tunnel, and obtaining the corresponding IP address informationaccording to the matched DNS item. Wherein, obtaining the matched DNSitem from the DNS server includes: the tunnel gateway device initiatingthe DNS request to the DNS server, the DNS server returning the DNSresponse, and the response carrying the IP address information.

If the tunnel gateway device does not store the DNS item in local, thegateway device obtains the matched DNS item from the DNS server, andobtains the corresponding IP address information according to thematched DNS item.

Wherein, the management protocol is a TR069 protocol or other terminalcontrol protocol, the tunnel includes the IPv6 and the IPv4 tunnel. Asto the DS-LITE, the outer layer of the tunnel is the IPv6 encapsulation,and the inner layer is the IPv4 data; as to the 6rd, the outer layer ofthe tunnel is the IPv4 encapsulation, and the inner layer is the IPv6data.

Wherein, the tunnel gateway device regards its own address as the DNSserver address and sends the address to the client when distributing theIP address for the client.

Wherein, the tunnel gateway device further stores the DNS item obtainedfrom the DNS server, and, when storing the DNS item, if the local DNSitem record is already full, then it deletes the local DNS itemaccording to storage time and/or use frequency of the DNS item.

Some DNS items can be pre-stored on the tunnel gateway device, used forresponding to the DNS request sent out by the client.

Wherein, the tunnel gateway device supports a slight-level dualstack-lite (DS-LITE) and/or an IPv6 rapid deployment (6rd) technology.

The both ends if the tunnel shown in FIG. 1 include the tunnel gatewaydevice and the tunnel network side device; the automatic control servermanages the tunnel gateway device, connecting through the internet; thetunnel gateway device can be connected through the IPv6 or IPv4 network,and the domain name server (DNS server) used for the service in theinner layer of the tunnel lies in the IPv6 or IPv4 network.

The tunnel technology includes the DS-LITE and the 6rd; as to theDS-LITE, the client is the IPv4 terminal, the internet network is theIPv6 network. The tunnel gateway device implements the encapsulation andtransmission of the IPv4 service, and the tunnel network side devicetransmits the IPv4 service to the IPv4 network after decapsulation. Asto the 6rd, the client is the IPv6 terminal, the internet network is theIPv4 network, the tunnel gateway device implements the encapsulation andtransmission of the IPv6 service, and the tunnel network side devicetransmits the IPv6 service to the IPv6 network after decapsulation.

The client needs to send the DNS request to obtain the correspondingrelation of the domain name and the IP address when connecting theinternet, and the DNS server is generally set in a static state orassigned dynamically, the tunnel gateway device can be regarded as theDNS Server to provide the domain name service, and after the clientinitiates the DNS request, the tunnel gateway device responds to the DNSrequest. Because the equipment capacity of the tunnel gateway device islimited, and it must interact with other network side DNS Servers tomeet the DNS request initiated by the client, the tunnel gateway deviceneeds to obtain the address of the network side DNS server.

The present invention uses the automatic control server to provide theaddress configuration of the DNS Server, and as to the tunnel gatewaydevice of the DS-LITE or the 6rd, the same configuration way is adoptedto implement the address configuration of the network side DNS server.

As shown in FIG. 2, the method for obtaining the DNS provided in thepresent invention includes:

configuring a corresponding address of the network side DNS server inthe tunnel gateway device through the management protocol at first, andthe address is the destination address used for the sent DNS request ofthe tunnel gateway device.

The tunnel gateway device receives the DNS request initiated by theclient;

the tunnel gateway device searches the local DNS item at first, if thereis no matched DNS item, the tunnel gateway device initiates the DNSrequest to the DNS server, the DNS server responds to the DNS requestand returns the DNS item to the tunnel gateway device; the tunnelgateway device obtains the DNS item, the DNS item can be bufferedlocally and responded to the client. Because the buffer memory of thetunnel gateway device is limited, after the local buffer record is fullyrecorded, if the new DNS item is reached, it needs to store the new DNSitem and delete the local associated DNS item. Deleting the DNS item canbe performed successively according to the time of storing the DNS item,and can also be judged according to the level of the use frequency ofthe DNS item, or both the use frequency and the time are used as thecondition for deleting.

If the tunnel gateway device does not store the DNS item locally, thegateway device obtains the matched DNS item from the DNS server, andobtains the corresponding IP address information according to thematched DNS item.

EMBODIMENT 1

As shown in FIG. 3, as to the 6rd gateway, after the client initiatesthe IPv6 DNS request, the gateway device searches the local DNS item atfirst, if there is no matched DNS item, then the tunnel gateway deviceinitiates the IPv6 DNS request and sends the request to the network sideIPv6 or IPv4 server according to its own IPv6 or IPv4 address, if therequest is sent according to the IPv6 address, the sent DNS request isthe data encapsulated by the IPv4, and the internet networktransparently transmits the related data; after the 6rd gateway obtainsthe DNS record of the IPv6, it responds to the IPv6 DNS request of theclient; if the request is sent through the IPv4 address, then the sentDNS request does not need to be encapsulated, but reaches the IPv4 DNSserver through the IPv4 network directly.

EMBODIMENT 2

As shown in FIG. 4, as to the DS-LITE gateway, after the clientinitiates the IPv6 DNS request, the tunnel gateway device searches thelocal DNS item at first, if there is no matched record, then the tunnelgateway device initiates the IPv4 DNS request and sends the request tothe network side IPv6 or IPv4 server according to its own IPv4 or IPv6address; if the request is sent according to the IPv4 address, the sentDNS request is the data encapsulated by the IPv6, and the internetnetwork transparently transmits the related data; after the DS-LITEgateway obtains the DNS record of the IPv4, it responds to the IPv4 DNSrequest of the client. If the request is sent according to the IPv4address, then the sent DNS request does not need to be encapsulated, butreaches the IPv4 DNS server through the IPv4 network directly.

EMBODIMENT 3

In the present embodiment, the automatic control server is used toprovide the address configuration of the DNS Server, and as to thetunnel gateway device of the DS-LITE or the 6rd, the same configurationway is used to implement the address configuration of the network sideDNS server.

The DS-LITE or 6rd tunnel gateway device distributes the network DNSserver address of the inner layer service of the tunnel according to themanagement protocol; the management protocol includes the TR069protocol. After the tunnel gateway device obtains the correspondingnetwork DNS server address of the inner layer service of the tunnel, thetunnel gateway device sends the DNS server address of the network ofinner layer service of the tunnel to the client. Usually in the processof negotiating the IP address, the tunnel gateway device brings theassociated DNS Server address information to the client.

After the client initiates the DNS request, it reaches the tunnelgateway device; the tunnel gateway device does not identify the DNSrequest, but encapsulates the request into the outer tunnel directly,transparently transmits the DNS request sent by the client to the remoteDNS server and transparently transmits the DNS response returned by theDNS server to the client. The tunnel gateway device does not participatein the interactive control of the DNS information, but only perform thetransparent transmission.

As to the DS-LITE, the outer layer of the tunnel is the IPv6encapsulation, and the inner layer is the IPv4 data;

As to the 6rd, the outer layer of the tunnel is the IPv4 encapsulation,and the inner layer is the IPv6 data.

Under the situation of the DS-LITE, the DNS server address of thenetwork of the inner layer service of the tunnel is the IPv4; under thesituation of the 6rd, the DNS server address of the network of the innerlayer service of the tunnel is the IPv6.

The embodiment of the present invention further provides a tunnelgateway device, configured to:

receive a domain name system (DNS) server address of an inner layerservice network of a tunnel configured by an automatic control serverthrough a management protocol; and

take an own address as the DNS server address and send the address to aclient, or send the DNS server address to the client.

Wherein, the tunnel gateway device further configured to: receive a DNSrequest of the client, or obtain IP address information corresponding tothe DNS request from the local or the DNS server, and return thecorresponding IP address information to the client.

Wherein, the tunnel gateway device is configured to obtain IP addressinformation corresponding to the DNS request from the local or the DNSserver according to the following way:

after receiving the DNS request, searching DNS item stored locally, whenthere is a matched DNS item in local, obtaining the corresponding IPaddress information according to the matched DNS item; when there is nomatched DNS item in local, obtaining the matched DNS item from theconfigured DNS server of the inner layer service network of the tunnel,and obtaining the corresponding IP address information according to thematched DNS item.

If the tunnel gateway device does not store the DNS item locally, thetunnel gateway device obtains the matched DNS item from the DNS serverafter receiving the DNS request, and obtains the corresponding IPaddress information according to the matched DNS item.

Wherein, the tunnel gateway device is further configured to: store theDNS item obtained from the DNS server, and when storing the DNS item, iflocal DNS item record is already full, then delete the local DNS itemaccording to storage time and/or use frequency of the DNS item.

Wherein, the tunnel gateway device is further configured to: receive theDNS request of the client, transparently forward the DNS request to theDNS server, and transparently forward the IP address informationreturned by the DNS server back to the client.

Wherein, the tunnel gateway device supports a slight-level dualstack-lite (DS-LITE) and/or an IPv6 rapid deployment (6rd) technology.

Wherein, the management protocol is a TR069 protocol or other terminalcontrol protocol.

It can be understood by those skilled in the art that all or part ofsteps in the above-mentioned method can be fulfilled by programsinstructing the relevant hardware components, and the programs can bestored in a computer readable storage medium such as a read only memory,a magnetic disk or an optical disk, etc. Alternatively, all or part ofthe steps in the above-mentioned embodiments can be implemented with oneor more integrated circuits. Accordingly, each module/unit in theabove-mentioned embodiments can be implemented in the form of hardware,or in the form of software function module. The present invention is notlimited to any specific form of the combination of the hardware andsoftware.

The above description is only the preferred embodiments of the presentinvention and is not intended to limit the present invention. For thoseskilled in the art, the present invention can have various modificationsand variations. All of modifications, alternative replacements,improvements etc. within the spirit and essence of the present inventionshould be included in the protection scope of the present invention.

INDUSTRIAL APPLICABILITY

The above-mentioned embodiment provides a method for distributing theDNS server without depending on the address protocol and method for theclient obtaining the DNS, the configuration way can be unified byconfiguring the address of the DNS Server according to the managementprotocol. The gateway buffers the corresponding DNS item and responds tothe DNS request sent by the client, which reduces the request quantitysent to the remote DNS server by the client.

1. A tunnel gateway device, configured to: receive a domain name system(DNS) server address for an inner layer or outer layer service of atunnel configured by an automatic control server according to amanagement protocol; and take the tunnel gateway device's address as theDNS server's address and send the address to a client, or send theconfigured DNS server's address to the client.
 2. The device accordingto claim 1, wherein, the tunnel gateway device is further configured to:receive a DNS request of the client, obtain IP address informationcorresponding to the DNS request from a local DNS table or theconfigured DNS server, and return the IP address informationcorresponding to the DNS request to the client.
 3. The device accordingto claim 2, wherein, the tunnel gateway device is configured to obtainIP address information corresponding to the DNS request from the localDNS table or the configured DNS server according to the following way:after receiving the DNS request, searching DNS items stored locally,when there is a matched DNS item in local, obtaining the IP addressinformation corresponding to the DNS request according to the matchedDNS item; when there is no matched DNS item in local, obtaining thematched DNS item from the configured DNS server, and obtaining the IPaddress information corresponding to the DNS request according to thematched DNS item; or, after receiving the DNS request, obtaining thematched DNS item from the configured DNS server, and obtaining the IPaddress information corresponding to the DNS request according to thematched DNS item.
 4. The device according to claim 3, wherein, thetunnel gateway device is further configured to: store the DNS itemobtained from the DNS server, and when storing the DNS item, if localDNS item record is already full, then delete the local DNS itemaccording aging policy.
 5. The device according to claim 1, wherein, thetunnel gateway device is further configured to: receive the DNS requestof the client, transparently forward the DNS request to the DNS server,and transparently forward the IP address information returned by the DNSserver back to the client.
 6. The device according to claim 1, wherein,the tunnel gateway device supports a slight-level dual stack-lite(DS-LITE) and/or an IPv6 rapid deployment (6rd) technology.
 7. Thedevice according to claim 1, wherein, the management protocol is a TR069protocol or other terminal control protocol.
 8. A method for obtaining adomain name system (DNS), comprising: an automatic control serverconfiguring a domain name system (DNS) server address for an inner layeror outer layer service of a tunnel on a tunnel gateway device accordingto a management protocol; and the tunnel gateway device taking a localaddress thereof as the DNS server's address and sending the address to aclient, or the tunnel gateway device sending the configured DNS server'saddress to the client.
 9. The method according to claim 8, wherein, whenthe tunnel gateway device takes an address thereof as the DNS server'saddress and sending the address to the client, further comprising: theclient sending a DNS request to the tunnel gateway device; and thetunnel gateway device obtaining IP address information corresponding tothe DNS request from the local DNS table or the configured DNS server,and returning the IP address information corresponding to the DNSrequest to the client.
 10. The method according to claim 9, wherein, thestep of the tunnel gateway device obtaining IP address informationcorresponding to the DNS request comprises: the tunnel gateway device,after receiving the DNS request, searching DNS items stored locally,when there is a matched DNS item in local, obtaining the IP addressinformation corresponding to the DNS request according to the matchedDNS item; when there is no matched DNS item in local, obtaining thematched DNS item from the configured DNS server for the inner layer orouter layer service of the tunnel, and obtaining the IP addressinformation corresponding to the DNS request according to the matchedDNS item; or, the tunnel gateway device, after receiving the DNSrequest, obtaining the matched DNS item from the configured DNS server,and obtaining the IP address information corresponding to the DNSrequest according to the matched DNS item.
 11. The method according toclaim 10, further comprising, the tunnel gateway device storing the DNSitem obtained from the DNS server, and when storing the DNS item, iflocal DNS item record is already full, then deleting the local DNS itemaccording to aging policy.
 12. The method according to claim 8, when thetunnel gateway device sends the DNS server's address to the client,further comprising: the tunnel gateway device receiving the DNS requestof the client, transparently forwarding the DNS request to the DNSserver, and transparently forwarding the IP address information returnedby the DNS server back to the client.
 13. The method according to claim8, wherein, the tunnel gateway device supports a slight-level dualstack-lite (DS-LITE) and/or an IPv6 rapid deployment (6rd) technology.14. The method according to claim 8, wherein, the management protocol isa TR069 protocol or other terminal control protocol.